/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package Model;

import javax.swing.table.DefaultTableModel;

/**
 *
 * @author William
 */
public class MyTableModel extends DefaultTableModel {

    public MyTableModel(Object[][] data, Object[] columnNames) {
        super(data, columnNames);
    }

    @Override
    public Class<?> getColumnClass(int columnIndex) {
        Class<?> clazz = Object.class;
        Object aux = getValueAt(0, columnIndex);
        if (aux != null) {
            clazz = aux.getClass();
        }

        return clazz;
    }

    @Override
    public boolean isCellEditable(int row, int column) {
        //all cells false
        return false;

    }

}
